﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Sockets;

using libReadWrite;
using libCommonClass;

namespace TTServer.Messages
{
    public abstract class SimpleMessage : TTMessage
    {
        private String _temporaryKey = "";

        public String TemporaryKey
        {
            get { return _temporaryKey; }
            set { _temporaryKey = value; }
        }

        public SimpleMessage()
        {

        }

        public override void ReadMessage(BigEndianReader sr)
        {
               this.TemporaryKey = sr.ReadString();
        }

        public override void WriteMessage(BigEndianWriter sw)
        {
            throw new NotImplementedException();
        }

    }

    public class NextSlideMessage : SimpleMessage
    {
        public override TTMessage Clone()
        {
            return new NextSlideMessage();
        }


        public override int GetMessageID()
        {
            return MessageKind.NEXT_SLIDE;
        }

        public override string GetMessageName()
        {
            return "NextSlide";
        }
    }
    public class PrevSlideMessage : SimpleMessage
    {
        public override TTMessage Clone()
        {
            return new PrevSlideMessage();
        }

        public override int GetMessageID()
        {
            return MessageKind.PREV_SLIDE;
        }

        public override string GetMessageName()
        {
            return "PrevSlide";
        }

    }

    public class StartSlideshowMessage : SimpleMessage
    {

        public override TTMessage Clone()
        {
            return new StartSlideshowMessage();
        }

        public override int GetMessageID()
        {
            return MessageKind.PPT_START_SLIDESHOW_REQUEST;
        }

        public override string GetMessageName()
        {
            return "StartSlideshow";
        }
    }

    public class EndSlideshowMessage : SimpleMessage
    {

        public override TTMessage Clone()
        {
            return new EndSlideshowMessage();
        }

        public override int GetMessageID()
        {
            return MessageKind.PPT_END_SLIDESHOW_REQUEST;
        }

        public override string GetMessageName()
        {
            return "EndSlideshow";
        }
    }

    public class ToggleBlackScreenMessage : SimpleMessage
    {
        public override TTMessage Clone()
        {
            return new ToggleBlackScreenMessage();
        }

        public override int GetMessageID()
        {
            return MessageKind.TOGGLE_BLACK_SCREEN;
        }

        public override string GetMessageName()
        {
            return "ToggleBlackScreen";
        }
    }

    public class ClearDrawingMessage : SimpleMessage
    {
        public override TTMessage Clone()
        {
            return new ClearDrawingMessage();
        }

        public override int GetMessageID()
        {
            return MessageKind.CLEAR_DRAWING;
        }

        public override string GetMessageName()
        {
            return "ClearDrawing";
        }
    }
}


